package com.shenyi.cloud.webConfig;


import com.shenyi.cloud.interceptor.CoreInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author richard.fan
 * @version 1.0
 * @date 2019/03/04
 * @desc WebMvc配置
 * @see [由于版本为springboot2.0 WebMvcConfigurerAdapter被遗弃]
 * @since 1.0
 */
@Configuration
@EnableWebMvc
public class WebMvcConfig extends WebMvcConfigurationSupport {


    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CoreInterceptor());
    }


}
